﻿using CleanArchitecture.Core.SharedKernel;
using System;

namespace CleanArchitecture.Infrastructure.Entities.AdminUsers
{
    /// <summary>
    /// Represents a customer password
    /// </summary>
    public partial class AdminUserPassword : BaseEntity
    {
        public AdminUserPassword()
        {
            this.PasswordFormat = EntityEnumConfig.PasswordFormat.Clear;
        }

        /// <summary>
        /// Gets or sets the AdminUser identifier
        /// </summary>
        public int FkUserId { get; set; }

        /// <summary>
        /// Gets or sets the password
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// Gets or sets the password format identifier
        /// </summary>
        public int PasswordFormatId { get; set; }

        public EntityEnumConfig.PasswordStrongLevel PasswordStrongLevel { get; set; }
        /// <summary>
        /// Gets or sets the password salt
        /// </summary>
        public string PasswordSalt { get; set; }

        /// <summary>
        /// Gets or sets the date and time of entity creation
        /// </summary>
        public DateTime CreatedOnTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the password format
        /// </summary>
        public EntityEnumConfig.PasswordFormat PasswordFormat
        {
            get => (EntityEnumConfig.PasswordFormat)PasswordFormatId;
            set => PasswordFormatId = (int)value;
        }

        /// <summary>
        /// Gets or sets the customer
        /// </summary>
        public virtual AdminUser AdminUser { get; set; }
    }
}